<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
    <head>
        <th:block th:include="include::header('开单人额度设置')" />
    </head>
    <body class="febs-container" id="febs-incentiveQuotaConfig">
        <div class="febs-body layui-fluid"  lay-title="开单人额度设置" >
            <div class="febs-body-search">
                <form class="jhg-body layui-form layui-table-form" lay-filter="incentiveQuotaConfig-table-form" id="incentiveQuotaConfig-table-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <div class="layui-inline" id="post-tenant" th:classappend="${hasHeadCompanyRole } ? '' : 'febs-hide'">
                                    <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                    <div class="layui-input-inline" style="width:240px;">
                                        <select name="tenantSelect" id="tenantSelect" lay-search="" >
                                            <option th:each="item:${tenantList }"
                                                    th:value="${item.tenantId}" th:text="${item.tenantName}"
                                                    th:selected="${currentTenantId ==item.tenantId}">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">年份</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <input type="text" placeholder="请输入年份" id="year" name="year" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">姓名</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <input type="text" placeholder="请输入姓名" name="realName" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">工号</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <input type="text" placeholder="请输入工号" name="userNo" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">部门</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <input type="text" placeholder="请输入部门" name="deptName" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <div id="query" class="layui-btn">
                                        <em class="layui-icon">&#xe615;</em> 查询
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="febs-table-full">
                <div class="layui-card febs-body-table">
                    <div class="layui-card-body">
                        <table lay-filter="incentiveQuotaConfigTable" id="incentiveQuotaConfigTable'}" lay-data="{id: 'incentiveQuotaConfigTable'}"></table>
                    </div>
                </div>
            </div>
        </div>
        <th:block th:include="include::foot" />
        <script type="text/html" id="incentiveQuotaConfig-toolbar">
            <div lay-event="add" class="layui-btn layui-btn-sm" shiro:hasPermission="incentiveQuotaConfig:add">
                <em class="layui-icon">&#xe654;</em> 新增
            </div>
            <div lay-event="apply" class="layui-btn layui-btn-sm" shiro:hasPermission="incentiveQuotaConfig:apply">
                <em class="layui-icon">&#xe654;</em> 限额申请
            </div>
        </script>
        <script type="text/html" id="incentiveQuotaConfig-tool">
            <span shiro:lacksPermission="incentiveQuotaConfig:edit,incentiveQuotaConfig:delete">
                <span class="layui-badge-dot febs-bg-orange"></span> 无权限
             </span>
            <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-orange" lay-event="edit" shiro:hasPermission="incentiveQuotaConfig:edit">
                <i class="layui-icon layui-icon-edit"></i>
                编辑
            </button>
            <button type="button"  class="layui-btn layui-btn-xs layui-btn-primary layui-border-red" lay-event="del" shiro:hasPermission="incentiveQuotaConfig:delete">
                <i class="layui-icon layui-icon-delete"></i>
                删除
            </button>
        </script>
        <script th:src="@{/febs/js/incentive/incentiveQuotaConfig/incentiveQuotaConfigList.js(v=1)}"></script>
        <script type="text/html" id="status-bar">
            <input type="checkbox" name="cStatus" value="{{d.status}}" lay-skin="switch" lay-text="启用|禁用"
                   lay-filter="configStatus" lay-event="statusEvent"  {{ d.status == '1' ? 'checked' : '' }} />
        </script>
        <script data-th-inline="javascript" >
            var currentTenantId = [[${currentTenantId}]];
            var userId = [[${userId}]];
            var hasHeadCompanyRole = [[${hasHeadCompanyRole}]];
            var tenantList = [[${tenantList }]];
        </script>
    </body>
</html>